package com.xuecheng.web.exceptions;

import com.xuecheng.commons.enums.ErrorCode;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * 自定义异常类
 *
 * @author 七安
 */
@Getter
@Setter
public class BusinessException extends Exception {
    private ErrorCode errorCode;

    public BusinessException(ErrorCode errorCode) {
        super(errorCode.getDesc());
        this.errorCode = errorCode;
    }
}
